 <?php
	print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n");
	print("<KID>\n");
	if(!isset($_GET["KID"]))
	{
		print("</KID>\n");
		return;
	}
	$db = mysql_connect("localhost","root","root");
    mysql_select_db("brainway");
    $query = "delete from knowledge_discription where KID=".$_GET["KID"];
    $result = mysql_query($query);
    if($result==null)       //name has existed
    {
        print("</KID>\n");
		return;
    }
    $query = "delete from datasource_knowledge where KID=".$_GET["KID"];
    $result = mysql_query($query);
    if($result==null)       //name has existed
    {
        print("</KID>\n");
		return;
    }
    $query = "delete from knowledge_conclusion where KID=".$_GET["KID"];
    $result = mysql_query($query);
    if($result==null)       //name has existed
    {
        print("</KID>\n");
		return;
    }
	$query = "delete from knowledge_name where KID=".$_GET["KID"];
    $result = mysql_query($query);
    if($result==null)       //name has existed
    {
        print("</KID>\n");
		return;
    }
    
    
    print($_GET["KID"]."</KID> \n");
?>